package com.blacktea.structuralpatterns.bridgepattern.service;

import com.blacktea.structuralpatterns.bridgepattern.client.Client;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @author: black tea
 * @date: 2023/3/22 15:57
 */
@Service("weChatMessageService")
@Slf4j
public class WeChatMessageServiceImpl extends MessageService {

    public WeChatMessageServiceImpl(@Qualifier("weChatClient") Client client) {
        super(client);
    }

    @Override
    public void sendMessage(String message) {
        log.info("通过wxClient发送消息：【{}】", message);
        client.sendMsg(message);
    }

    @Override
    public void receiveMessage(String message) {
        log.info("通过wxClient解码消息：【{}】", message);
        client.receiveMsg(message);
    }

}
